/*
 * gyroscope.h
 *
 *  Created on: Dec 6, 2012
 *      Author: michiel
 */

#ifndef GYROSCOPE_H_
#define GYROSCOPE_H_

#include <ros/ros.h>
#include <sensor_msgs/Joy.h>

#include "PS3Controller/PS3_buttons.h"
#include "topic/topic.h"

class Gyroscope {
	protected:
		ros::NodeHandle nh_;
		ros::Subscriber joy_sub_;

		double yaw_;
		double left_;
		double up_;
		double forward_;
	protected:
		void joyCallback(const sensor_msgs::Joy::ConstPtr &msg);
	public:
		Gyroscope() : nh_("~"){
			init();
		}
		~Gyroscope() {
			nh_.shutdown();
		}
		void init();
		void spin();
};


#endif /* GYROSCOPE_H_ */
